package com.hoshino.momochi.service.Impl;

import com.hoshino.momochi.mapper.BlogLikeMapper;
import com.hoshino.momochi.model.domain.BlogLike;
import com.hoshino.momochi.service.BlogLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BlogLikeServiceImpl implements BlogLikeService {

    @Autowired
    private BlogLikeMapper blogLikeMapper;

    @Override
    public void addBlogLike(BlogLike blogLike) {
        blogLikeMapper.addBlogLike(blogLike);
    }

    @Override
    public void delBlogLike(BlogLike blogLike) {
        blogLikeMapper.delBlogLike(blogLike);
    }

    @Override
    public BlogLike findBlogLikeByTwoId(BlogLike blogLike) {
        return blogLikeMapper.findBlogLikeByTwoId(blogLike);
    }

    @Override
    public Integer getCountFromBlog(BlogLike blogLike) {
        return blogLikeMapper.getCountFromBlog(blogLike);
    }

    @Override
    public List<BlogLike> getBlogLikeList(BlogLike blogLike) {
        return blogLikeMapper.getBlogLikeList(blogLike);
    }

    @Override
    public Long checkUserLikeBlog(Long uid, Long bid) {
        return blogLikeMapper.checkUserLikeBlog(uid, bid);
    }

    @Override
    public List<BlogLike> getWhoLikeMe(Long uid) {
        return blogLikeMapper.getWhoLikeMe(uid);
    }

    @Override
    public void delIsDeleteAsTrue() {
        blogLikeMapper.delIsDeleteAsTrue();
    }
}
